package com.ruibang.glass.material.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruibang.glass.material.domain.req.*;
import com.ruibang.glass.material.domain.resp.GlassBindResp;
import com.ruibang.glass.material.domain.resp.QualityManageDetailResp;
import com.ruibang.glass.material.domain.resp.external.ContentTypeStartTime;
import com.ruibang.glass.material.domain.resp.external.RackBindRecord;
import com.ruibang.glass.material.entity.MaterialContentLot;
import com.teaming.cloud.framework2.autoconfigure.mybatisplus.mapper.CommonMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * A型架和水平托盘容器绑定的批次号信息 Mapper 接口
 * </p>
 *
 * @author wujie
 * @since 2024-02-05
 */
@Mapper
public interface MaterialContentLotMapper extends CommonMapper<MaterialContentLot> {

    MaterialContentLot getLotByContentCode(@Param("contentCode") String contentCode);

    MaterialContentLot getLotByParams(@Param("lotReq") MaterialContentLotReq reqVo);

    List<ContentTypeStartTime> getLotTypeStartTime();
    void updateColdContentLot(@Param("startTime") String startTime);

    void updateHotContentLot(@Param("startTime") String startTime);

    List<RackBindRecord> querySLRackBindRecord(@Param("startTime") String startTime);

    List<RackBindRecord> queryBCRackBindRecord(@Param("startTime") String startTime);

    List<QualityManageDetailResp> queryByContentCode(IPage<QualityManageDetailResp> page, @Param("contentCode") String contentCode);

    QualityManageDetailResp getContentDetail(@Param("lotId") String lotId);

    List<GlassBindResp> getGlassBindData(@Param("bindReq") GlassBindReq bindReq);

    Integer getMaxSerialNumber(@Param("contentLotId") String contentLotId);

    void unbind(@Param("unbindReq") UnbindReq unbindReq);

    void unbinds(@Param("unbindReq") UnbindReq unbindReq);

    void applyCheck(@Param("checkReq") QualityCheckReq checkReq);

    void checkQuality(@Param("checkReq") QualityCheckReq checkReq);

    void changeQuality(@Param("changeReq") QualityChangeReq changeReq);

    void applyWarehouse(@Param("lotId") String lotId);

    List<String> getBindDataByLotId(@Param("lotId") String lotId);

}
